<h1>Delivery Order Document</h1>
<?php 
    if($deliveryorder){$data = $deliveryorder['data'];$lineitems = $deliveryorder['lineitem'];?>
<fieldset>
<legend>Data</legend>
<table>
    <tr>
        <td><label>Creation Date</label></td>
        <td><label><?php echo $data->CreationDate;?></label></td>
        <td>Delivery Order No</td>
        <td><label><?php echo $data->DONumber;?></label></td>
    </tr>
    <tr>
        <td><label>Bill Of Lading No</label></td>
        <td><label><?php echo $data->BLNumber;?></label></td>
        <td>BC11 No</td>
        <td><label><?php echo $data->BC11Number;?></label></td>
    </tr>
    <tr>
        <td>Shipper</td>
        <td><label><?php echo $data->SLName;?></label></td>
        <td></td>
        <td></td>
    </tr>
    <tr>
        <td></td>
        <td><label><?php echo $data->SLAddress;?></label></td>
        <td></td>
        <td></td>
    </tr>
    <tr>
        <td></td>
        <td><label><?php echo $data->SLTelp;?></label></td>
        <td></td>
        <td></td>
    </tr>
    <tr>
        <td>Deliver To</td>
        <td><label><?php echo $data->DTName;?></label></td>
        <td>Issued To</td>
        <td><label><?php echo $data->ITName;?></label></td>
    </tr>
    <tr>
        <td></td>
        <td><label><?php echo $data->DTAddress;?></label></td>
        <td></td>
        <td><label><?php echo $data->ITAddress;?></label></td>
    </tr>
    <tr>
        <td></td>
        <td><label><?php echo $data->DTTelp;?></label></td>
        <td></td>
        <td><label><?php echo $data->ITTelp;?></label></td>
    </tr>
    <tr>
        <td>Terminal</td>
        <td><label><?php echo $data->Terminal;?></label></td>
        <td>Port of Loading</td>
        <td><label><?php echo $data->PortOfLoading;?></label></td>
    </tr>
    <tr>
        <td>Vessel</td>
        <td><label><?php echo $data->Vessel;?></label></td>
        <td>Port of Discharge</td>
        <td><label><?php echo $data->PortOfDischarge;?></label></td>
    </tr>
    <tr>
        <td>GoDown</td>
        <td><label><?php echo $data->GoDown;?></label></td>
        <td>ArriveOn</td>
        <td><label><?php echo $data->ArriveOn;?></label></td>
    </tr>
</table>
</fieldset>
<fieldset>
<legend>Container</legend>
    <table>
        <tr>
            <td>Container No</td>
            <td>Kind Package</td>
            <td>Gross Weight</td>
            <td>Nett Weight</td>
            <td>Measurement</td>
            <td>Detail</td>
            <td>Total Package</td>
        </tr>
        <?php foreach($lineitems as $lineitem){ 
            $containerdetails = $lineitem->ContainerDetail?>
        <tr>
            <td><?php echo $lineitem->ContainerNo;?></td>
            <td><?php echo $lineitem->KindPackage;?></td>
            <td><?php echo $lineitem->GrossWeight;?></td>
            <td><?php echo $lineitem->NettWeight;?></td>
            <td><?php echo $lineitem->Measurement;?></td>
            <td>
               <?php foreach($containerdetails as $containerdetail){
                   echo $containerdetail->QuantityPackage. ' '.$containerdetail->Description;
                   echo '</br>';
               }?>
            </td>
            <td><?php echo $lineitem->TotalPackage;?></td>
        </tr>
        <?php } ?>
    </table>
</fieldset>
<br/>
<?php }?>
